load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "storageccl",
    srcs = [
        "encryption.go",
        "external_sst_reader.go",
    ],
    importpath = "github.com/cockroachdb/cockroach/pkg/ccl/storageccl",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/base",
        "//pkg/cloud",
        "//pkg/kv/kvpb",
        "//pkg/settings",
        "//pkg/storage",
        "//pkg/util/ioctx",
        "//pkg/util/mon",
        "//pkg/util/retry",
        "@com_github_cockroachdb_errors//:errors",
        "@com_github_cockroachdb_pebble//sstable",
        "@com_github_cockroachdb_pebble//vfs",
        "@org_golang_x_crypto//pbkdf2",
    ],
)

go_test(
    name = "storageccl_test",
    size = "large",
    srcs = [
        "encryption_test.go",
        "external_sst_reader_test.go",
        "main_test.go",
    ],
    embed = [":storageccl"],
    deps = [
        "//pkg/base",
        "//pkg/cloud",
        "//pkg/cloud/nodelocal",
        "//pkg/keys",
        "//pkg/security/securityassets",
        "//pkg/security/securitytest",
        "//pkg/server",
        "//pkg/settings/cluster",
        "//pkg/storage",
        "//pkg/testutils",
        "//pkg/testutils/serverutils",
        "//pkg/testutils/storageutils",
        "//pkg/testutils/testcluster",
        "//pkg/util/cidr",
        "//pkg/util/encoding",
        "//pkg/util/humanizeutil",
        "//pkg/util/ioctx",
        "//pkg/util/leaktest",
        "//pkg/util/log",
        "//pkg/util/mon",
        "//pkg/util/randutil",
        "@com_github_stretchr_testify//require",
    ],
)
